<template>
  <el-container>
    <el-header class="header">
      <!-- 命名视图 -->
      <router-view name="header"></router-view>
    </el-header>
    <el-container class="middle">
      <el-aside class="aside">
        <!-- 命名视图 -->
        <router-view name="sidebar"></router-view>
      </el-aside>
      <el-main class="main">
        <!-- 使用 router-view 组件指定路由出口，默认名称是 default -->
        <router-view></router-view>
      </el-main>
    </el-container>
    <el-footer class="footer">
        <!-- 命名视图 -->
        <router-view name="footer"></router-view>
    </el-footer>
  </el-container>
</template>

<script>
export default {
  name: 'App'
}
</script>

<style>
body {
  margin: 0;
  padding: 0;
}
</style>

<style scoped>
.header{
  background: #fff;
  height: 10vh;
}
.middle {
  height: 80vh;
}
.aside {
  width: 20vw;
  background: #dfdfdf;
}
.main {
  width: 80vw;
  background: #9696fa;
}
.footer {
  height: 10vh;
}
</style>
